FROM python:3.9

RUN apt update

RUN apt install -y gcc libffi-dev libgl1-mesa-glx zip libxss1 libappindicator1 libgconf-2-4 libc6 \
 libglib2.0-0 libnss3 libx11-6 libatk-bridge2.0-0 libgbm1 libxkbcommon0 libasound2

RUN wget -P /opt https://storage.googleapis.com/chrome-for-testing-public/125.0.6422.60/linux64/chrome-linux64.zip

RUN unzip /opt/chrome-linux64.zip -d /opt

RUN ln -s /opt/chrome-linux64/chrome /usr/local/bin/chrome

RUN wget -P /opt https://storage.googleapis.com/chrome-for-testing-public/125.0.6422.60/linux64/chromedriver-linux64.zip

RUN unzip /opt/chromedriver-linux64.zip -d /opt

RUN ln -s /opt/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver

RUN rm -f /opt/chrome-linux64.zip /opt/chromedriver-linux64.zip
